


{if count($ownmodules) > 0}
<h2>Your Uploaded Modules</h2>
<table border="0" cellpadding="0" cellspacing="0" class="full">
          <tbody>
            <tr>
              <th scope="col">Module Name</th>
              <th scope="col">Version</th>
              <th scope="col">Edit</th>
            </tr>
            {foreach from=$ownmodules item=mod}
            	<tr>
            		<td>{$mod.moduleReadableName}</td>
            		<td>{$mod.version}</td>
            		<td><a href="{$module->linkTo(array('Upload', $mod.id))}">Edit</a></td>
            	</tr>
            {/foreach}
          </tbody>
</table>
{/if}


<form class="yform full" method="post" action="{$module->linkTo('Upload')}" enctype="multipart/form-data">

<fieldset>
	<legend>Upload a new Module</legend>
	
	<div class="subcr type-text">
		<label>Category</label>
		<select name="cat_id">
		{foreach from=$module->getCategories() item=cat}
			<option value="{$cat.id}">{$cat.name}</option>
		{/foreach}
		</select>
	</div>
	
	<div class="subcr type-text">
		<label>Module Name (eg. Blog Tool)</label>
		<input type="text" name="readablename" tabindex="1" id="readablename" value="{$PFW.post->get('readablename')}" />
	</div>
	
	<div class="subcr type-text">
		<label>Module Class (eg. BlogTool)</label>
		<input type="text" name="classname" tabindex="2" id="moduleclass" value="{$PFW.post->get('classname')}"  />
	</div>
	
	<div class="subcr type-text">
		<label>Version (eg. 1.0)</label>
		<input type="text" name="version" tabindex="3" id="version" value="{$PFW.post->get('version')}" />
	</div>
	
	<div class="subcr type-text">
		<label>Description</label>
		<textarea cols="40" rows="10" name="description">{$PFW.post->get('description')}</textarea>
	</div>
	
	<div class="subcr type-text">
		<label>Upload Zip file</label>
		<input name="uploadedfile" type="file" />
	</div>
</fieldset>
<fieldset>
	<div class="subcr type-text">
		<p>
		By uploading your module you agree to these terms:
		</p>
		<ol>
			<li>Your module will be licensed opensource under the <a href="http://www.gnu.org/licenses/gpl.html">General Public License V3</a>. </li>
			<li>You are the respectful owner of this module or have granted the permission of the author to post this module.</li>
			<li>Your module is working with one of the PeecFW API's.</li>
			<li>PeecFW.org is now owner of the contents published, we can delete your module if it breaks our terms of service or violates PeecFW coding standards.</li>
		</ol>
		
	</div>
</fieldset>

<fieldset>
	
	<div class="type-button">
    	<input type="submit" class="submit" value="Add Module!" />
	</div>

</fieldset>



</form>